package com.software.myopiaparents.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.software.myopiaparents.R;
import com.software.myopiaparents.base.BaseFragment;
import com.software.myopiaparents.ui.AlarmPromptActivity;
import com.software.myopiaparents.ui.EquipmentManageActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * @author penglei
 * @date 2020/05/15
 * 设备管理
 */
public class ConnectFragment extends BaseFragment {
    private static final String TAG = "ConnectFragment";

    @BindView(R.id.iv_title_left)
    ImageView mIvTitleLeft;
    @BindView(R.id.tv_title_text)
    TextView mTvTitleText;
    @BindView(R.id.tv_title_right)
    TextView mTvTitleRight;
    @BindView(R.id.lay_title_home)
    LinearLayout mLayTitleHome;

    @BindView(R.id.ll_device_img)
    ImageView mLlDeviceImg;
    @BindView(R.id.ll_device_name)
    TextView mLlDeviceName;
    @BindView(R.id.ll_device)
    LinearLayout mLlDevice;
    @BindView(R.id.ll_alarm_img)
    ImageView mLlAlarmImg;
    @BindView(R.id.ll_alarm_name)
    TextView mLlAlarmName;
    @BindView(R.id.ll_alarm)
    LinearLayout mLlAlarm;
    Unbinder unbinder;


    @Override
    protected int getContentViewId() {
        return R.layout.fragment_connect;
    }

    @Override
    public void initView() {
        mIvTitleLeft.setVisibility(View.GONE);
        mTvTitleText.setText(getResources().getString(R.string.s_prevention_myopia));
        mLayTitleHome.setBackgroundColor(getResources().getColor(R.color.color_FFFFFF));
    }

    @Override
    public void initData() {
    }

    @OnClick({R.id.ll_device,R.id.ll_alarm})
    public void onClick(final View view) {
        Intent intent;
        switch (view.getId()) {
            case R.id.ll_device:
                intent = new Intent(getActivity(), EquipmentManageActivity.class);
                startActivity(intent);
                break;

            case R.id.ll_alarm:
                intent = new Intent(getActivity(), AlarmPromptActivity.class);
                startActivity(intent);
                break;
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }


}
